/**
 * 
 */
var btnList,btnInput,btnModify,btnDelete;
var url ='index.jsp?inc=./Js/member/';
function general(){
	if(document.getElementById("btnList") != null){
		document.getElementById('btnList').onclick = function(){
//			alert("general");
			location.href = url+"list.jsp";
//			var frm = document.hidfrm;
//			frm.action = url+"list.jsp";
//			frm.submit();
		}
	}
	if(document.getElementById('btnInput')!=null){
		document.getElementById('btnInput').onclick=function(){
			
			var frm = document.hidfrm;
			frm.action = url+"input.jsp";
			frm.submit();
		}
	}
	if(document.getElementById('btnModify')!=null){
		document.getElementById('btnModify').onclick=function(){
			location.href = 'modify.jsp';
		}
	}
	if(document.getElementById('btnDelete')!=null){
		document.getElementById('btnDelete').onclick=function(){
			var b = confirm("정말 삭제 하시겠습니까??");
			if(b){
				var f = document.memberFrm;
				f.action = url + 'delete_result.jsp';
				f.submit();
			}else{
				alert("삭제작업이 취소 되었습니다.");
				
			}
			
		}
	}
	if(document.getElementById('btnView')!=null){
		document.getElementById('btnView').onclick=function(){
			location.href = 'view.jsp';
		}
	}
}
function goPage(page){
//	location.href = 'view.jsp?page='+page;
	var mf = document.hidfrm;
	mf.nowPage.value = page;
	mf.find.value = document.member_list_frm.find.value;
	mf.action = "index.jsp?inc =./Js/member/list.jsp";
	
	mf.submit();
}
function inputInit(){//input과 관련 모듈
	
	general();
	document.getElementById('btnSave').onclick =function(){
		var ff = document.frmm;
		if(ff.mid.value == "" || ff.pwd.value == ""){
			alert("입력해");
		}else{
			ff.action ='index.jsp?inc=./Js/member/input_result2.jsp';
			ff.submit();
		}
	}
}
function listInit(){
	/*alert("0");*/
	general();
}
function viewInit(){
	general();
}
function goView(page,mid){
	var kk = document.hidfrm;
	kk.nowPage.value = page;
	kk.mid.value = mid;
	kk.action ="index.jsp?inc=./Js/member/view.jsp";
	
	kk.submit
}
function modifyInit(){
	general();
	document.getElementById("btnSave").onclick = function(){
		var f = document.frm;
		if(f.mid.value==""||f.pwd.value ==""){
			alert("적어");
		}else{
			f.submit();
		}
	}
}
function deleteInit(){
	general();
}